package com.andox.fn.inf.rpc.rest.serializer;

import com.andox.fn.inf.rpc.rest.extension.SPI;

/**
 * @ClassName: Serializer
 * @author: Andox
 * @date: 2019年7月31日 下午3:32:18
 * 
 */
@SPI
public interface Serializer {
	byte[] serialize(Object object);

	String serializeAsString(Object object);

	<T> T unserialize(byte[] source, Class<T> clazz);

	<T> T unserializeFromString(String source, Class<T> clazz);
}
